package edu.stanford.jgc.datacollector;

import android.location.Address;
import edu.stanford.jgc.GeocoderWrapper.GeocoderWrapper;



public class DataCollector {

	private String address; 
	Address geocodedAddress;
	private String activityName;
	private String zipCode;
	private String URL; 	
	private String minAge = "Any";
	private String maxAge = "Any";
	private Type programType = Type.Any;
	private String daysOffered = "Any Day";
	private String startTime = "Any Time";
	private String endTime = "Any Time";
	private String radius;
	private final GeocoderWrapper geocoder;
	
	public DataCollector(GeocoderWrapper geocoder){
		this.geocoder = geocoder;
	}
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}
	
	public String getactivityName() {
		return activityName;
	}

	public void setActivityName(String activityName) {
		this.activityName = activityName;
	}

	public String getURL() {
		return URL;
	}

	public void setURL(String uRL) {
		URL = uRL;
	}

	public String getMinAge() {
		return minAge;
	}

	public void setMinAge(String minAge) {
		this.minAge = minAge;
	}

	public String getMaxAge() {
		return maxAge;
	}

	public void setMaxAge(String maxAge) {
		this.maxAge = maxAge;
	}
	public String getZipCode() {
		return zipCode;
	}

	public void setZipCode(String zipCode) {
		this.zipCode = zipCode;
	}

	public Type getProgramType() {
		return programType;
	}

	public void setProgramType(Type programType) {
		this.programType = programType;
	}

	public String getDaysOffered() {
		return daysOffered;
	}

	public void setDaysOffered(String daysOffered) {
		this.daysOffered = daysOffered;
	}

	public String getStartTime() {
		return startTime;
	}

	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}

	public String getEndTime() {
		return endTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}

	public String getRadius() {
		return radius;
	}

	public void setRadius(String radius) {
		this.radius = radius;
	}

	public enum Type {
		Any,
		Sports,
		FaithBased,
		Academic,
		YouthLeadership,
		CommunityService,
		Recreational,
		ArtsAndMusic,
		TechnologyVocational,
		Mentorship,
		HealthServicesEducation
	}

	public Double getLatitude(){
		return geocodedAddress.getLatitude();
	}
	
	public Double getLongitude(){
		return geocodedAddress.getLongitude();
	}
	
	public boolean validateAddress() {
		geocodedAddress = geocoder.geocode(address);
		if (geocodedAddress == null){
			return false;
		}
		return true;
	};


}
